import request from '@/utils/request'

// 创建用户
export function create(data) {
  return request({
    url: '/member//create',
    method: 'post',
    data: data
  })
}

// 更新用户
export function update(data) {
  return request({
    url: '/member//update',
    method: 'put',
    data: data
  })
}

// 删除用户
// export function delete(id) {
//   return request({
//     url: '/member//delete?id=' + id,
//     method: 'delete'
//   })
// }

// 获得用户
export function get(id) {
  return request({
    url: '/member//get?id=' + id,
    method: 'get'
  })
}

// 获得用户分页
export function getPage(query) {
  return request({
    url: '/member//page',
    method: 'get',
    params: query
  })
}

// 导出用户 Excel
export function exportExcel(query) {
  return request({
    url: '/member//export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
